

ac.item('6级装备礼包'){
    tip = [[打开获得一件6级随机装备(小概率获得7级)]],
    item_type = "charged",
    auto_merge = true,
    count = 1,
    cool = 0.2,
    on_use = function(self)
        local unit = self.owner
        local player = unit.owner
        local list = {}
        local lock = {}
        while #list<3 do
            --local level = math.random(100)<=10 and 7 or 6
            local name = random_item_name(6)
            if lock[name]==nil then
                lock[name] = true
                list[#list + 1] = ac.item.new(name)
            end
        end
        list._unit = unit
        player:notify('玩家-随机选择装备',player,list)
    end
}


ac.item('7级装备礼包'){
    tip = [[打开获得一件7级随机装备]],
    item_type = "charged",
    auto_merge = true,
    count = 1,
    cool = 0.2,
    on_use = function(self)
        local unit = self.owner
        local player = unit.owner
        local list = {}
        local lock = {}
        while #list<3 do
            local name = random_item_name(7)
            if lock[name]==nil then
                lock[name] = true
                list[#list + 1] = ac.item.new(name)
            end
        end
        list._unit = unit
        player:notify('玩家-随机选择装备',player,list)
    end
}